home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / Chip Temmuz 2004.iso / program / antispam / RazorAgent_SDK / razor-agents-sdk-2.03.exe / URI-1.19 / t / clone.t < prev    next >
Encoding:
Text File  |  2001-04-24  |  391 b   |  20 lines

  1. print "1..2\n";
  2.  
  3. use strict;
  4. use URI::URL;
  5.  
  6. my $b = URI::URL->new("http://www/");
  7.  
  8. my $u1 = URI::URL->new("foo", $b);
  9. my $u2 = $u1->clone;
  10.  
  11. $u1->base("http://yyy/");
  12.  
  13. #use Data::Dump; Data::Dump::dump($b, $u1, $u2);
  14.  
  15. print "not " unless $u1->abs->as_string eq "http://yyy/foo";
  16. print "ok 1\n";
  17.  
  18. print "not " unless $u2->abs->as_string eq "http://www/foo";
  19. print "ok 2\n";
  20.